﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace ElasticReflection
{
    public class ElasticMember<TBase> where TBase : MemberInfo
    {
        internal TBase Base;

        public string Name
        {
            get
            {
                return Base.Name;
            }
        }
        public ElasticType Parent { get; private set; }

        public object Instance
        {
            get
            {
                return Parent.Instance;
            }
            set
            {
                Parent.Instance = value;
            }
        }

        internal ElasticMember(ElasticType Parent,TBase Base)
        {
            this.Parent = Parent;
            this.Base = Base;
        }
    }
}
